<?php

 /**
  * @package JooS
  * @subpackage Syntax_PHPackager
  */

  require_once "JooS/Syntax/Complex/Transition.php";

  class JooS_Syntax_PHPackager_DOM_Version extends JooS_Syntax_Complex_Transition {
    /**
     * @return JooS_Syntax_Complex_Concatenate
     */
    protected function createRule() {
      return $this->createSyntax("Complex_Concatenate", array(
        $this->createSyntax("Complex_Choose", array(
          $this->createSyntax("Except", $this->createSyntax("Common_Digits"), $this->createSyntax("Simple_Symbol", "0")), 
          $this->createSyntax("Simple_Symbol", "0")
        )), 

        $this->createSyntax("Complex_Repetition", $this->createSyntax("Complex_Concatenate", array(
          $this->createSyntax("Simple_Symbol", "."), 
          $this->createSyntax("Complex_Choose", array(
            $this->createSyntax("Except", $this->createSyntax("Common_Digits"), $this->createSyntax("Simple_Symbol", "0")), 
            $this->createSyntax("Simple_Symbol", "0")
          ))
        )), 3)
      ));
    }
  }
